import axios from './axios'


//请求方法封装
export function get(url) {

    return function(params) {
        return axios.get(url,{params}).then(res => {
       
                return res
          
        })
    }
}

export function get1(url) {

    return function(parms) {
        return axios.get(url,{parms},{responseType: "blob"}).then(res => {
       
                return res
          
        })
    }
}

export function post(url) {

    return function(data) {
        return axios.post(url,data).then(res => {
         
                return res
         
        })
    }
}
export function Delete(url) {

    return function(data) {
        return axios.delete(url,{ data: JSON.stringify(data)}).then(res => {
         
                return res
         
        })
    }
}

export function put(url) {

    return function(data) {
        return axios.put(url,{data}).then(res => {
         
                return res
         
        })
    }
}